package com.alex.controller;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by user on 2019/3/9.
 */
@RestController
public class UserController {

    @GetMapping("/user/{id}")
    public ResponseEntity<String> getUser(@PathVariable Integer id){
        return ResponseEntity.status(HttpStatus.OK).body("user: "+id);
    }

    @GetMapping("/order/{id}")
    public ResponseEntity<String> getOrderr(@PathVariable Integer id){
        return ResponseEntity.status(HttpStatus.OK).body("order: "+id);
    }
}
